home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_bas / t2win_32.zip / _MISC.FRM < prev    next >
Text File  |  1996-05-14  |  18KB  |  673 lines

  1. VERSION 4.00
  2. Begin VB.Form frmMisc 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Miscelleanous"
  5.    ClientHeight    =   4785
  6.    ClientLeft      =   1890
  7.    ClientTop       =   3270
  8.    ClientWidth     =   7485
  9.    Height          =   5190
  10.    Left            =   1830
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   4785
  14.    ScaleWidth      =   7485
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2925
  17.    Width           =   7605
  18.    Begin VB.TextBox txt_Result 
  19.       BackColor       =   &H00C0C0C0&
  20.       BorderStyle     =   0  'None
  21.       Height          =   4005
  22.       Left            =   105
  23.       Locked          =   -1  'True
  24.       MultiLine       =   -1  'True
  25.       ScrollBars      =   2  'Vertical
  26.       TabIndex        =   0
  27.       Top             =   630
  28.       Width           =   7260
  29.    End
  30.    Begin Threed.SSPanel SSPanel1 
  31.       Align           =   1  'Align Top
  32.       Height          =   480
  33.       Left            =   0
  34.       TabIndex        =   1
  35.       Top             =   0
  36.       Width           =   7485
  37.       _Version        =   65536
  38.       _ExtentX        =   13203
  39.       _ExtentY        =   847
  40.       _StockProps     =   15
  41.       ForeColor       =   -2147483640
  42.       BackColor       =   12632256
  43.       Begin VB.ComboBox cmb_Function 
  44.          Height          =   315
  45.          Left            =   1365
  46.          TabIndex        =   2
  47.          Top             =   90
  48.          Width           =   4785
  49.       End
  50.       Begin Threed.SSCommand SSCommand1 
  51.          Default         =   -1  'True
  52.          Height          =   300
  53.          Left            =   6615
  54.          TabIndex        =   6
  55.          Top             =   90
  56.          Width           =   465
  57.          _Version        =   65536
  58.          _ExtentX        =   820
  59.          _ExtentY        =   529
  60.          _StockProps     =   78
  61.          Caption         =   "&Go"
  62.          BevelWidth      =   1
  63.          RoundedCorners  =   0   'False
  64.          Outline         =   0   'False
  65.       End
  66.       Begin VB.Label Label2 
  67.          Caption         =   "&Select a function"
  68.          Height          =   255
  69.          Left            =   90
  70.          TabIndex        =   5
  71.          Top             =   120
  72.          Width           =   1275
  73.       End
  74.       Begin Threed.SSCommand cmdNP 
  75.          Height          =   300
  76.          Index           =   0
  77.          Left            =   6300
  78.          TabIndex        =   4
  79.          Top             =   90
  80.          Width           =   255
  81.          _Version        =   65536
  82.          _ExtentX        =   450
  83.          _ExtentY        =   529
  84.          _StockProps     =   78
  85.          Caption         =   "<"
  86.          BevelWidth      =   1
  87.          Font3D          =   3
  88.          RoundedCorners  =   0   'False
  89.          Outline         =   0   'False
  90.       End
  91.       Begin Threed.SSCommand cmdNP 
  92.          Height          =   300
  93.          Index           =   1
  94.          Left            =   7140
  95.          TabIndex        =   3
  96.          Top             =   90
  97.          Width           =   255
  98.          _Version        =   65536
  99.          _ExtentX        =   450
  100.          _ExtentY        =   529
  101.          _StockProps     =   78
  102.          Caption         =   ">"
  103.          BevelWidth      =   1
  104.          Font3D          =   3
  105.          RoundedCorners  =   0   'False
  106.          Outline         =   0   'False
  107.       End
  108.    End
  109. End
  110. Attribute VB_Name = "frmMisc"
  111. Attribute VB_Creatable = False
  112. Attribute VB_Exposed = False
  113. Option Explicit
  114. Option Base 1
  115.  
  116. Private Const Iteration = 250
  117.  
  118. Dim IsLoaded         As Integer
  119.  
  120. Dim TimerStartOk     As Integer
  121. Dim TimerCloseOk     As Integer
  122.  
  123. Dim TimerHandle      As Integer
  124. Dim TimerValue       As Long
  125.  
  126. Private Sub cmdNP_Click(Index As Integer)
  127.  
  128.    Call sub_NextPrev(cmb_Function, Index)
  129.  
  130. End Sub
  131.  
  132.  
  133. Private Sub cmb_Function_Click()
  134.    
  135.    If (IsLoaded = False) Then Exit Sub
  136.    
  137.    Call cDisableFI(mdiT2W.Picture1)
  138.    
  139.    txt_Result = ""
  140.    
  141.    DoEvents
  142.    
  143.    Select Case cmb_Function.ListIndex
  144.       Case 0
  145.          Call TestSwapX
  146.       Case 1
  147.          Call TestMinMax
  148.       Case 2
  149.          Call TestIncrX
  150.       Case 3
  151.          Call TestRndX
  152.       Case 4
  153.          Call TestSpellMoney
  154.       Case 5
  155.          Call TestFraction
  156.       Case 6
  157.          Call TestBaseConversion
  158.       Case 7
  159.          Call TestCombination
  160.    End Select
  161.  
  162.    DoEvents
  163.    Call cEnableFI(mdiT2W.Picture1)
  164.    
  165. End Sub
  166.  
  167.  
  168. Private Sub Form_Activate()
  169.  
  170.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  171.  
  172. End Sub
  173.  
  174. Private Sub Form_Load()
  175.  
  176.    IsLoaded = False
  177.    
  178.    Show
  179.  
  180.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_misc.t2w")
  181.    
  182.    IsLoaded = True
  183.    
  184. End Sub
  185.  
  186. Private Sub SSCommand1_Click()
  187.    
  188.    Call cmb_Function_Click
  189.    
  190. End Sub
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198. Private Sub TestSwapX()
  199.  
  200.    Dim intResult        As Integer
  201.    Dim strResult        As String
  202.    Dim strDisplay       As String
  203.    
  204.    Dim i                As Integer
  205.    
  206.    Dim Str1             As String
  207.    Dim Str2             As String
  208.    
  209.    Dim b1               As Byte
  210.    Dim b2               As Byte
  211.    Dim i1               As Integer
  212.    Dim i2               As Integer
  213.    Dim l1               As Long
  214.    Dim l2               As Long
  215.    Dim s1               As Single
  216.    Dim s2               As Single
  217.    Dim d1               As Double
  218.    Dim d2               As Double
  219.    
  220.    strResult = ""
  221.    strDisplay = ""
  222.    
  223.    Str1 = "Hello"
  224.    Str2 = "World"
  225.    
  226.    b1 = 0
  227.    b2 = 255
  228.    i1 = -32768
  229.    i2 = 32767
  230.    l1 = -2147483647
  231.    l2 = 2147483647
  232.    s1 = 12345.5678
  233.    s2 = 98765.4321
  234.    d1 = 12345.67890123
  235.    d2 = 98765.43210987
  236.    
  237.    strDisplay = strDisplay + "SwapB of '" & b1 & " - " & b2 & "' is "
  238.    Call cSwapB(b1, b2)
  239.    strDisplay = strDisplay + "'" & b1 & " - " & b2 & "'" & vbCrLf & vbCrLf
  240.  
  241.    strDisplay = strDisplay + "SwapI of '" & i1 & " - " & i2 & "' is "
  242.    Call cSwapI(i1, i2)
  243.    strDisplay = strDisplay + "'" & i1 & " - " & i2 & "'" & vbCrLf & vbCrLf
  244.  
  245.    strDisplay = strDisplay + "SwapL of '" & l1 & " - " & l2 & "' is "
  246.    Call cSwapL(l1, l2)
  247.    strDisplay = strDisplay + "'" & l1 & " - " & l2 & "'" & vbCrLf & vbCrLf
  248.  
  249.    strDisplay = strDisplay + "SwapS of '" & s1 & " - " & s2 & "' is "
  250.    Call cSwapS(s1, s2)
  251.    strDisplay = strDisplay + "'" & s1 & " - " & s2 & "'" & vbCrLf & vbCrLf
  252.  
  253.    strDisplay = strDisplay + "SwapD of '" & d1 & " - " & d2 & "' is "
  254.    Call cSwapD(d1, d2)
  255.    strDisplay = strDisplay + "'" & d1 & " - " & d2 & "'" & vbCrLf & vbCrLf
  256.  
  257.    strDisplay = strDisplay + "SwapStr of '" & Str1 & " - " & Str2 & "' is "
  258.    Call cSwapStr(Str1, Str2)
  259.    strDisplay = strDisplay + "'" & Str1 & " - " & Str2 & "'" & vbCrLf & vbCrLf
  260.  
  261.    strDisplay = strDisplay + "SwapStr of '" & Str1 & " - " & Str2 & "' is "
  262.    Call cSwapStr(Str1, Str2)
  263.    strDisplay = strDisplay + "'" & Str1 & " - " & Str2 & "'"
  264.      
  265.    txt_Result = strDisplay
  266.  
  267.    'time the function
  268.  
  269.    TimerHandle = cTimerOpen()
  270.    TimerStartOk = cTimerStart(TimerHandle)
  271.    
  272.    For i = 1 To Iteration
  273.       Call cSwapD(d1, d2)
  274.    Next i
  275.    
  276.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  277.    
  278.    TimerCloseOk = cTimerClose(TimerHandle)
  279.  
  280. End Sub
  281.  
  282. Private Sub TestMinMax()
  283.    
  284.    Dim lngResult        As Long
  285.    Dim strResult        As String
  286.    Dim strDisplay       As String
  287.    
  288.    Dim i                As Integer
  289.    
  290.    Dim Str1             As String
  291.    Dim Str2             As String
  292.    
  293.    lngResult = 0
  294.    
  295.    strResult = ""
  296.    strDisplay = ""
  297.      
  298.    strDisplay = strDisplay & "Min of '32760,1234567' is '" & cMin(32760, 1234567) & "'" & vbCrLf & vbCrLf
  299.    
  300.    strDisplay = strDisplay & "Max of '32760,1234567' is '" & cMax(32760, 1234567) & "'"
  301.    
  302.    txt_Result = strDisplay
  303.  
  304.    'time the function
  305.  
  306.    TimerHandle = cTimerOpen()
  307.    TimerStartOk = cTimerStart(TimerHandle)
  308.    
  309.    For i = 1 To Iteration
  310.       lngResult = cMax(32760, 1234567)
  311.    Next i
  312.    
  313.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  314.    
  315.    TimerCloseOk = cTimerClose(TimerHandle)
  316.  
  317. End Sub
  318.  
  319. Private Sub TestIncrX()
  320.    
  321.    Dim lngResult        As Long
  322.    Dim strResult        As String
  323.    Dim strDisplay       As String
  324.    
  325.    Dim i                As Integer
  326.    
  327.    Dim Str1             As String
  328.    Dim Str2             As String
  329.    
  330.    lngResult = 0
  331.    
  332.    strResult = ""
  333.    strDisplay = ""
  334.      
  335.    i = 1
  336.    Call cIncrI(i)
  337.    strDisplay = strDisplay & "IncrI of '" & 1 & "' is '" & i & "'" & vbCrLf
  338.    i = 32000
  339.    Call cIncrI(i)
  340.    strDisplay = strDisplay & "IncrI of '" & 32000 & "' is '" & i & "'" & vbCrLf
  341.    i = -32768
  342.    Call cIncrI(i)
  343.    strDisplay = strDisplay & "IncrI of '" & -32768 & "' is '" & i & "'" & vbCrLf & vbCrLf
  344.    
  345.    i = 1
  346.    Call cDecrI(i)
  347.    strDisplay = strDisplay & "DecrI of '" & 1 & "' is '" & i & "'" & vbCrLf
  348.    i = 32000
  349.    Call cDecrI(i)
  350.    strDisplay = strDisplay & "DecrI of '" & 32000 & "' is '" & i & "'" & vbCrLf
  351.    i = -32767
  352.    Call cDecrI(i)
  353.    strDisplay = strDisplay & "DecrI of '" & -32767 & "' is '" & i & "'" & vbCrLf & vbCrLf
  354.    
  355.    lngResult = 1
  356.    Call cIncrL(lngResult)
  357.    strDisplay = strDisplay & "IncrL of '" & 1 & "' is '" & lngResult & "'" & vbCrLf
  358.    lngResult = 32000
  359.    Call cIncrL(lngResult)
  360.    strDisplay = strDisplay & "IncrL of '" & 32000 & "' is '" & lngResult & "'" & vbCrLf
  361.    lngResult = -32768
  362.    Call cIncrL(lngResult)
  363.    strDisplay = strDisplay & "IncrL of '" & -32768 & "' is '" & lngResult & "'" & vbCrLf & vbCrLf
  364.    
  365.    lngResult = 1
  366.    Call cDecrL(lngResult)
  367.    strDisplay = strDisplay & "DecrL of '" & 1 & "' is '" & lngResult & "'" & vbCrLf
  368.    lngResult = 32000
  369.    Call cDecrL(lngResult)
  370.    strDisplay = strDisplay & "DecrL of '" & 32000 & "' is '" & lngResult & "'" & vbCrLf
  371.    lngResult = -32768
  372.    Call cDecrL(lngResult)
  373.    strDisplay = strDisplay & "DecrL of '" & -32768 & "' is '" & lngResult & "'"
  374.    
  375.    txt_Result = strDisplay
  376.  
  377.    'time the function
  378.  
  379.    TimerHandle = cTimerOpen()
  380.    TimerStartOk = cTimerStart(TimerHandle)
  381.    
  382.    For i = 1 To Iteration
  383.       Call cIncrI(i)
  384.    Next i
  385.    
  386.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  387.    
  388.    TimerCloseOk = cTimerClose(TimerHandle)
  389.  
  390. End Sub
  391.  
  392. Private Sub TestRndX()
  393.    
  394.    Dim lngResult        As Long
  395.    Dim strResult        As String
  396.    Dim strDisplay       As String
  397.    
  398.    Dim i                As Integer
  399.    
  400.    Dim Str1             As String
  401.    Dim Str2             As String
  402.    
  403.    lngResult = 0
  404.    
  405.    strResult = ""
  406.    strDisplay = ""
  407.      
  408.    Call cRndInit(-1)
  409.    
  410.    strDisplay = "Some random Integer number" & vbCrLf & vbCrLf
  411.  
  412.    For i = 1 To 2
  413.       strDisplay = strDisplay & cRndI() & vbCrLf
  414.    Next i
  415.  
  416.    strDisplay = strDisplay & vbCrLf
  417.  
  418.    strDisplay = strDisplay & "Some random Long number" & vbCrLf & vbCrLf
  419.  
  420.    For i = 1 To 2
  421.       strDisplay = strDisplay & cRndL() & vbCrLf
  422.    Next i
  423.  
  424.    strDisplay = strDisplay & vbCrLf
  425.  
  426.    strDisplay = strDisplay & "Some random Single number" & vbCrLf & vbCrLf
  427.  
  428.    For i = 1 To 2
  429.       strDisplay = strDisplay & cRndS() & vbCrLf
  430.    Next i
  431.  
  432.    strDisplay = strDisplay & vbCrLf
  433.  
  434.    strDisplay = strDisplay & "Some random Double number" & vbCrLf & vbCrLf
  435.  
  436.    For i = 1 To 2
  437.       strDisplay = strDisplay & cRndD() & vbCrLf
  438.    Next i
  439.  
  440.    strDisplay = strDisplay & vbCrLf
  441.  
  442.    strDisplay = strDisplay & "Some random Double number between 0.0 and 1.0" & vbCrLf & vbCrLf
  443.  
  444.    For i = 1 To 2
  445.       strDisplay = strDisplay & cRnd() & vbCrLf
  446.    Next i
  447.    
  448.    txt_Result = strDisplay
  449.  
  450.    'time the function
  451.  
  452.    TimerHandle = cTimerOpen()
  453.    TimerStartOk = cTimerStart(TimerHandle)
  454.    
  455.    For i = 1 To Iteration
  456.       lngResult = cRndL()
  457.    Next i
  458.    
  459.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  460.    
  461.    TimerCloseOk = cTimerClose(TimerHandle)
  462.  
  463. End Sub
  464.  
  465. Private Sub TestSpellMoney()
  466.    
  467.    Dim lngResult        As Long
  468.    Dim strResult        As String
  469.    Dim strDisplay       As String
  470.    
  471.    Dim i                As Integer
  472.    
  473.    Dim Str1             As String
  474.    
  475.    Dim Units            As String
  476.    Dim Cents            As String
  477.  
  478.    lngResult = 0
  479.    
  480.    strResult = ""
  481.    strDisplay = ""
  482.      
  483.    Units = "dollars"
  484.    Cents = "cents"
  485.  
  486.    strDisplay = "Spelling the following money value " & vbCrLf & vbCrLf
  487.  
  488.    strDisplay = strDisplay & "4.12 is '" & cSpellMoney(4.12, Units, Cents) & "'" & vbCrLf & vbCrLf
  489.    strDisplay = strDisplay & "16 is '" & cSpellMoney(16, Units, Cents) & "'" & vbCrLf & vbCrLf
  490.    strDisplay = strDisplay & "25 is '" & cSpellMoney(25, Units, Cents) & "'" & vbCrLf & vbCrLf
  491.    strDisplay = strDisplay & "34 is '" & cSpellMoney(34, Units, Cents) & "'" & vbCrLf & vbCrLf
  492.    strDisplay = strDisplay & "43 is '" & cSpellMoney(43, Units, Cents) & "'" & vbCrLf & vbCrLf
  493.    strDisplay = strDisplay & "61 is '" & cSpellMoney(61, Units, Cents) & "'" & vbCrLf & vbCrLf
  494.    strDisplay = strDisplay & "98765.43 is '" & cSpellMoney(98765.43, Units, Cents) & "'" & vbCrLf & vbCrLf
  495.    strDisplay = strDisplay & "123456789.75 is '" & cSpellMoney(123456789.75, Units, Cents) & "'"
  496.  
  497.    txt_Result = strDisplay
  498.  
  499.    'time the function
  500.  
  501.    TimerHandle = cTimerOpen()
  502.    TimerStartOk = cTimerStart(TimerHandle)
  503.    
  504.    For i = 1 To Iteration
  505.       strResult = cSpellMoney(12.34, Units, Cents)
  506.    Next i
  507.    
  508.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  509.    
  510.    TimerCloseOk = cTimerClose(TimerHandle)
  511.  
  512. End Sub
  513.  
  514. Private Sub TestFraction()
  515.    
  516.    Dim dblResult        As Double
  517.    Dim strResult        As String
  518.    Dim strDisplay       As String
  519.    
  520.    Dim i                As Integer
  521.    Dim v                As Double
  522.    Dim n                As Double
  523.    Dim p                As Double
  524.    Dim q                As Double
  525.    Dim e                As Integer
  526.    
  527.    Dim Str1             As String
  528.    
  529.    Dim Units            As String
  530.    Dim Cents            As String
  531.  
  532.    dblResult = 0
  533.    
  534.    strResult = ""
  535.    strDisplay = ""
  536.      
  537.    strDisplay = "Determining fraction part (numerator/denominator) for the following value " & vbCrLf & vbCrLf
  538.  
  539.    n = 4.12
  540.    v = cFraction(n, p, q)
  541.    strDisplay = strDisplay & n & " is " & p & " / " & q & vbCrLf
  542.    strDisplay = strDisplay & "   value is " & v & vbCrLf & vbCrLf
  543.    
  544.    n = 1.75
  545.    v = cFraction(n, p, q)
  546.    strDisplay = strDisplay & n & " is " & p & " / " & q & vbCrLf
  547.    strDisplay = strDisplay & "   value is " & v & vbCrLf & vbCrLf
  548.    
  549.    n = 0.5
  550.    v = cFraction(n, p, q)
  551.    strDisplay = strDisplay & n & " is " & p & " / " & q & vbCrLf
  552.    strDisplay = strDisplay & "   value is " & v & vbCrLf & vbCrLf
  553.    
  554.    n = 365.25
  555.    v = cFraction(n, p, q)
  556.    strDisplay = strDisplay & n & " is " & p & " / " & q & vbCrLf
  557.    strDisplay = strDisplay & "   value is " & v & vbCrLf & vbCrLf
  558.  
  559.    n = 3.14
  560.    v = cFraction(n, p, q)
  561.    strDisplay = strDisplay & n & " is " & p & " / " & q & vbCrLf
  562.    strDisplay = strDisplay & "   value is " & v & vbCrLf & vbCrLf
  563.  
  564.    n = 3.14159
  565.    v = cFraction(n, p, q)
  566.    strDisplay = strDisplay & n & " is " & p & " / " & q & vbCrLf
  567.    strDisplay = strDisplay & "   value is " & v & vbCrLf & vbCrLf
  568.  
  569.    n = 3.14159265
  570.    v = cFraction(n, p, q)
  571.    strDisplay = strDisplay & n & " is " & p & " / " & q & vbCrLf
  572.    strDisplay = strDisplay & "   value is " & v & vbCrLf & vbCrLf
  573.  
  574.    n = 0.9999999
  575.    v = cFraction(n, p, q)
  576.    strDisplay = strDisplay & n & " is " & p & " / " & q & vbCrLf
  577.    strDisplay = strDisplay & "   value is " & v
  578.  
  579.    txt_Result = strDisplay
  580.  
  581.    'time the function
  582.  
  583.    TimerHandle = cTimerOpen()
  584.    TimerStartOk = cTimerStart(TimerHandle)
  585.    
  586.    For i = 1 To Iteration
  587.       dblResult = cFraction(n, p, q)
  588.    Next i
  589.    
  590.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  591.    
  592.    TimerCloseOk = cTimerClose(TimerHandle)
  593.  
  594. End Sub
  595.  
  596. Private Sub TestBaseConversion()
  597.    
  598.    Dim lngResult        As Long
  599.    Dim strResult        As String
  600.    Dim strDisplay       As String
  601.    
  602.    Dim i                As Integer
  603.    
  604.    Dim Str1             As String
  605.    
  606.    lngResult = 0
  607.    
  608.    strResult = ""
  609.    strDisplay = ""
  610.      
  611.    For i = 1 To 34
  612.       strDisplay = strDisplay & "Convert '1234567' base 10 to base " & i & " is " & cBaseConversion("1234567", 10, i) & vbCrLf
  613.    Next i
  614.  
  615.    txt_Result = strDisplay
  616.  
  617.    'time the function
  618.  
  619.    TimerHandle = cTimerOpen()
  620.    TimerStartOk = cTimerStart(TimerHandle)
  621.    
  622.    For i = 1 To Iteration
  623.       strResult = cBaseConversion("123456789", 10, 10)
  624.    Next i
  625.    
  626.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  627.    
  628.    TimerCloseOk = cTimerClose(TimerHandle)
  629.  
  630. End Sub
  631.  
  632. Private Sub TestCombination()
  633.    
  634.    Dim dblResult        As Double
  635.    Dim strResult        As String
  636.    Dim strDisplay       As String
  637.    
  638.    Dim i                As Integer
  639.    
  640.    Dim Str1             As String
  641.    
  642.    dblResult = 0
  643.    
  644.    strResult = ""
  645.    strDisplay = ""
  646.      
  647.    For i = 0 To 10
  648.       strDisplay = strDisplay & "Combination C(42, " & i & ") is '" & cCombination(42, i) & "'" & vbCrLf
  649.    Next i
  650.  
  651.    strDisplay = strDisplay & vbCrLf
  652.  
  653.    For i = 42 To 32 Step -1
  654.       strDisplay = strDisplay & "Combination C(42, " & i & ") is '" & cCombination(42, i) & "'" & vbCrLf
  655.    Next i
  656.  
  657.    txt_Result = strDisplay
  658.  
  659.    'time the function
  660.  
  661.    TimerHandle = cTimerOpen()
  662.    TimerStartOk = cTimerStart(TimerHandle)
  663.    
  664.    For i = 1 To Iteration
  665.       dblResult = cCombination(42, 6)
  666.    Next i
  667.    
  668.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  669.    
  670.    TimerCloseOk = cTimerClose(TimerHandle)
  671.  
  672. End Sub
  673.